import { ColumnProps } from "@/components/Table/type";
import { SchemaProps } from "@/components/Form/type";
export const columns: ColumnProps[] = [
  { type: "index", label: "#", width: 50 },
  { prop: "datasourceName", label: "名称", width: 200, search: { el: "input" } },
  { prop: "username", label: "用户名", width: 200 },
  { prop: "url", label: "地址" },
  { prop: "action", label: "操作", width: 150, fixed: "right" }
];

export const schemas: SchemaProps[] = [
  {
    field: "datasourceName",
    label: "名称",
    required: true
  },
  {
    field: "username",
    label: "用户名",
    required: true
  },
  {
    field: "password",
    label: "密码",
    required: true,
    elProps: {
      type: "password",
      showPassword: true
    }
  },
  {
    field: "url",
    label: "地址",
    required: true,
    elProps: {
      type: "textarea"
    }
  }
];
